home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
earcd
/
grafica
/
video easel
/
camrexx
/
randanneal.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-30
|
662b
|
26 lines
/* Rand-Anneal by an idea of Toffoli, CAMRexx version by THOR */
MakeAlgorithm:
PLANEALGORITHM neumann hv
return
MakePlane:
if plane=0 then; do
/* anneal-algorithm */
sum=center+north+south+west+east
rand=center_ & north_ & south_ & west_ & east_
if sum<parameters.border-1 then SETPLANE off
if sum=parameters.border-1 then SETPLANE rand
if sum=parameters.border then; do
rand=~rand
SETPLANE rand
end
if sum>parameters.border then SETPLANE on
end
/* "random" generator */
if plane=1 then; do
rand=(east_ & south_ ) ^ west_ ^ north_ ^ center_
SETPLANE rand
end
return